//
//  SearchBehaviour.swift
//  StoryboardObject
//
//  Created by CaryaLiu on 2021/4/9.
//

import UIKit

class SearchBehaviour: HIKBehaviour {
    
    @IBOutlet weak var descLabel: UILabel!
    
    @IBAction func searchBtnTouched(_ sender: Any) {
        let storyboard = UIStoryboard(name: "Main", bundle: nil)
        let nextvc = storyboard.instantiateViewController(withIdentifier: "NextViewController")
        owner?.navigationController?.pushViewController(nextvc, animated: true)
    }
    
}

extension SearchBehaviour: UITextFieldDelegate {
    func textFieldDidBeginEditing(_ textField: UITextField) {
        print(#file, #function)
    }
    
    func textFieldDidEndEditing(_ textField: UITextField) {
        descLabel.text = textField.text
    }
}
